package spring.boot.Log.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {

    private static final Logger logger = LoggerFactory.getLogger(HelloController.class);

    @GetMapping("hello")
    public Object hello(){

        new Thread(() -> {
            while (true){
                logger.info("======info");
                logger.warn("======warn");
                logger.error("======error");
                logger.debug("======debug");
            }

        }).start();



        return "hello world";
    }
}
